<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">分组管理页面</block>
<block name="appendheader"> 
	<!-- 删除确认插件 --> 
	<script type="text/javascript" src="__PUBLIC__/artDialog/jquery.artDialog.js?skin=default"></script> 
	<script type="text/javascript" src="__PUBLIC__/artDialog/iframeTools.js"></script> 
	<script type="text/javascript" src="__PUBLIC__/common/js/list.js"></script> 
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-2000").addClass('active');	//选中父菜单
			$("#WebMenu-3000").addClass('active');	//选中当前菜单
		});
		
		//重置密码
		function reset_pwd(userid) {  
			var custom_data;
			art.dialog.confirm('密码将重置为“666666"，确定要重置吗？', function() {
				$.ajax({
			        type:"POST",
			        dataType:'json',
			        url:'?g=Admin&m=Groups_user&a=reset_pwd',
			        data:{userid:userid},
			        success:function(data){
			        	
			        	if(data.status == '1') {
			        		art.dialog({
				        	    icon: 'succeed',
				        	    content: data.info,
				        	    time:2
				        	});
			        		//location.reload(true);
			        		//custom_data=data.data;
				        	//$('#test').load(custom_data.url);
			        	} else {
			        		art.dialog({
				        	    icon: 'error',
				        	    content: data.info,
				        	    time:2
				        	});
			        	}
			        },
			        error:function(data){
			        	art.dialog({
			        	    icon: 'error',
			        	    content: '重置密码失败！！！',
			        	    time:2
			        	});
			        }
			    });
		    });
		};
		
		//改变检索条件时提交表单
		function submit_form() {
			$("#searchForm").submit();
		}
	</script> 
	<script type="text/javascript">
		$(function() {
			//特别注意：
			//在模态窗口中异步加载的内容只有第一次传递参数值是合适的，在不刷新页面的情况下以后的加载都直接从缓存中读取
			//为避免此类bug，在每次关闭模态窗口时在回调函数中刷新整个网页（songyb 2015-08-18）
			$('#set_user_role').on('hidden.bs.modal', function (e) {
				location.reload(true);
			});	
		});
</block>
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">成员管理</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="#">基础数据</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="#">分组管理</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">成员管理</li>
	</ol>
</block>
<!-- 网页主内容区 -->
<block name="main_content">
	<div class="row">
		<div class="col-md-12">
			<div class="portlet box">
				<div class="portlet-body">
					<div class="row mbm">
						<div class="col-md-3">
							<a href="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=add" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;添加</a>&nbsp;
							<a href="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=import" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;批量导入</a>&nbsp;
							<a href="javascript:confirm_deleteall();" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;批量删除</a>&nbsp;
						</div>
						<div class="col-md-9">
							<form id="searchForm" name="searchForm" action="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a={:ACTION_NAME}" method="post">
								<div class="col-sm-9 col-md-9">
									
								</div>
								<div class="col-md-3"> 
									<div class="dataTables_filter" id="table_id_filter">
										<label>
											<div class="input-group">
												<input type="search" value="{$Think.request.search_keyword}" name="search_keyword" placeholder="请输入关键字检索" class="form-control" />
												<span class="input-group-btn">
													<input type="submit" class="btn btn-success" value="查询" />
												</span>
											</div>
										</label>
									</div>
								</div>
							</form>
						</div>
					</div>
					<form id="myform" name="myform" action="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=delete" method="post" >
						<table class="table table-hover table-striped table-bordered table-advanced tablesorter tb-sticky-header">
							<thead>
								<tr>
									<th width="40"><input type="checkbox" class="checkall" /></th>
									<th width="80">分组编号</th>
									<th width="80">用户名</th>
									<th width="80">姓名</th>
									<th width="50">性别</th>
									<th width="80">职称</th>
									<th width="80">职务</th>
									<th width="100">身份证号</th>
									<th width="100">联系方式</th>
									<th width="150">电子邮箱</th>
								    <th width="220">操作</th>
								</tr>
							</thead>
							<tbody>
								<volist name="data" id="vo">
									<tr>
										<td><input type="checkbox" id="ids" name="ids[{$i}]" value="{$vo.id}" /></td>
										<td>{$vo.groupsid}</td>
										<td>{$vo.name}</td>
										<td>{$vo.real_name}</td>
										<td>{$vo.gender}</td>
										<td>{$vo.professional}</td>
										<td>{$vo.duty}</td>
										<td>{$vo.certificate_no}</td>
										<td>{$vo.phone}</td>
										<td>{$vo.email}</td>
										<td>
											<a type="button" href="javascript:reset_pwd('{$vo.id}');" class="btn btn-warning btn-xs mbs"><i class="fa fa-edit"></i>&nbsp;重置密码</a>&nbsp;
											<a type="button" href="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=edit&id={$vo.id}" class="btn btn-blue btn-xs mbs"><i class="fa fa-edit"></i>&nbsp;编辑</a>&nbsp;
											<a type="button" href="javascript:confirm_delete('ids[{$i}]')" class="btn btn-danger btn-xs mbs"><i class="fa fa-trash-o"></i>&nbsp;删除</a> 
										</td>
									</tr>
								</volist>
							</tbody>
						</table>
					</form>
					<!-- 显示分页信息 --> 
					{$show}
				</div>
			</div>
		</div>
	</div>
</block>
